'use client' import type { FC } from 'react' import React, { useEffect } from 'react' import cn from 'classnames' import type { IMainProps } from '@/app/components/share/chat' import EmbeddedChatbot from '@/app/components/base/chat/embedded-chatbot' import Loading from '@/app/components/base/loading' import { fetchSystemFeatures } from '@/service/share' import LogoSite from '@/app/components/base/logo/logo-site' const Chatbot: FC = () => { const [isSSOEnforced, setIsSSOEnforced] = React.useState(true) const [loading, setLoading] = React.useState(true) useEffect(() => { fetchSystemFeatures().then((res) => { setIsSSOEnforced(res.sso_enforced_for_web) setLoading(false) }) }, []) return ( <> { loading ? (
) : ( <> {isSSOEnforced ? (

Warning: Chatbot is not available

Because SSO is enforced. Please contact your administrator.

) : } )} ) } export default React.memo(Chatbot)